package main

import "fmt"

type Books struct {
	title   string
	author  string
	subject string
	bookId  int
}

func main() {
	a := Books{"title", "author", "subject", 1}
	fmt.Println(a)
	b := Books{title: "title", author: "author"}
	fmt.Println(b)
	fmt.Println(b.author)
	b.author = "author2"
	fmt.Println(b.author)
	printBook(b)
	fmt.Println(b)
	printBookPointer(&b)
	fmt.Println(b)
}

func printBook(book Books) {
	fmt.Println(book)
	book.subject = "subject"
}
func printBookPointer(book *Books) {
	fmt.Println(*book)
	book.subject = "subject"
}
